package com.sunmoon.mingshuo.view.fragment

import android.os.Bundle
import android.view.LayoutInflater
import android.view.ViewGroup
import com.sunmoon.mingshuo.BR
import com.sunmoon.mingshuo.R
import com.sunmoon.mingshuo.databinding.FragmentFictionBinding
import com.sunmoon.mingshuo.spider.Spider
import com.sunmoon.mingshuo.viewModel.FictionViewModel
import io.reactivex.Scheduler
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers
import me.goldze.mvvmhabit.base.BaseFragment

class FictionFragment(): BaseFragment<FragmentFictionBinding,FictionViewModel>() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        Spider.search("武炼巅峰")
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe {
                it.res
            }

    }
    override fun initVariableId(): Int {
       return BR.viewModel
    }

    override fun initContentView(p0: LayoutInflater?, p1: ViewGroup?, p2: Bundle?): Int {
        return R.layout.fragment_fiction
    }




}